using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MMM.Core.Domain;
using ServiceStack.ServiceHost;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace MMM.Services.Type
{
    [Serializable]
    [Route("/api/user", "POST,DELETE,PUT")]
    [Alias("UserInfo")]
    public class User : EntityBase<User>
    {
        /// <summary>
        /// 名称
        /// </summary>
        [StringLength(50)]
        [Required]
        public String Name { get; set; }
        /// <summary>
        /// 所在部门
        /// </summary>
        [StringLength(50)]
        [Required]
        public Guid? DepartID { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [StringLength(50)]
        [Required]
        public String Email { get; set; }
        /// <summary>
        /// 显示名称
        /// </summary>
        [StringLength(50)]
        public String DisplayName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [StringLength(100)]
        [Required]
        public String Slat { get; set; }
        /// <summary>
        /// 密码2
        /// </summary>
        [StringLength(50)]
        [Required]
        public String PasswordHash { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime ModifiedDate { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Required]
        public int Flag { get; set; }

    }
}
